home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / comm / tcp / AmiTCPsdk_40.lha / AmiTCP-4.0 / netinclude / clib / usergroup_protos.h < prev   
C/C++ Source or Header  |  1994-10-03  |  2KB  |  85 lines

  1. #ifndef CLIB_USERGROUP_PROTOS_H
  2. #define CLIB_USERGROUP_PROTOS_H \
  3.        "$Id: usergroup_protos.h,v 4.1 1994/10/03 20:54:51 ppessi Exp $"
  4. /*
  5.  *    C prototypes for usergroup.library
  6.  *
  7.  *      Copyright © 1994 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. #ifndef LIBRARIES_USERGROUP_H
  13. #include <libraries/usergroup.h>
  14. #endif
  15.  
  16. #ifndef PWD_H
  17. #include <pwd.h>
  18. #endif
  19.  
  20. #ifndef GRP_H
  21. #include <grp.h>
  22. #endif
  23.  
  24. /* Setup functions */
  25. int ug_SetupContextTagList(const UBYTE* pname, struct TagItem *taglist);
  26. int ug_SetupContextTags(const UBYTE* pname,  ...);
  27. int ug_GetErr(void);
  28. const char *ug_StrError(LONG code);
  29.  
  30. /* User identification */
  31. uid_t getuid(void);
  32. uid_t geteuid(void);
  33. int setreuid(uid_t real, uid_t eff);
  34. int setuid(uid_t id);
  35.  
  36. /* Group membership */
  37. gid_t getgid(void);
  38. gid_t getegid(void);
  39. int setregid(gid_t real, gid_t eff);
  40. int setgid(gid_t id);
  41. int getgroups(int ngroups, gid_t *groups);
  42. int setgroups(int ngroups, const gid_t *groups);
  43. int initgroups(const char *name, gid_t basegroup);
  44.  
  45. /* User database */
  46. struct passwd *getpwnam(const char *name);
  47. struct passwd *getpwuid(uid_t uid);
  48. void setpwent(void);
  49. struct passwd *getpwent(void);
  50. void endpwent(void);
  51.  
  52. /* Group database */
  53. struct group *getgrnam(const char * name);
  54. struct group *getgrgid(gid_t gid);
  55. void setgrent(void);
  56. struct group *getgrent(void);
  57. void endgrent(void);
  58.  
  59. /* Password handling */
  60. char *crypt(const char *key, const char *salt);
  61. char *ug_GetSalt(const struct passwd *user, char *buffer, ULONG size);
  62. char *getpass(const char *prompt);
  63.  
  64. /* Default protections */
  65. mode_t umask(mode_t mask);
  66. mode_t getumask(void);
  67.  
  68. /* Sessions */
  69. pid_t setsid(void);
  70. pid_t getpgrp(void);
  71. char *getlogin(void);
  72. int setlogin(const char *buffer);
  73.  
  74. /* Sessions, user login database (utmp) */
  75. void setutent(void);
  76. struct utmp *getutent(void);
  77. void endutent(void);
  78. struct lastlog *getlastlog(uid_t uid);
  79. int setlastlog(uid_t uid, char *name, char *host);
  80.  
  81. /* Credentials */
  82. struct UserGroupCredentials *getcredentials(struct Task *task);
  83.  
  84. #endif /* CLIB_USERGROUP_PROTOS_H */
  85.